﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using NOSDC.Pocos;
using NOSDC.Entities;

namespace NOSDC.Repositories
{
    public class UserDetailsRepository : IUserDetails
    {
        private readonly NOSDCContext _context = new NOSDCContext();

        public void AddUserDetails(UserDetail details)
        {
            _context.UserDetails.AddObject(details);
            _context.SaveChanges();
        }

        public void UpdateUserDetails(UserDetail details)
        {
            throw new NotImplementedException();
        }

        public UserDetail GetUserDetails(Guid userID)
        {
            return _context.UserDetails.Where(user => user.UserID.Equals(userID)).FirstOrDefault();
        }
    }
}
